package org.pearl.oauth2.authorizationserverdemo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author td
 * @since 2021-07-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Permission对象", description="")
public class Permission implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "permission_id", type = IdType.AUTO)
    private Integer permissionId;

    @ApiModelProperty(value = "权限的实体，可以是用户，角色，角色实例，机构等等，可以扩展")
    private Integer permissionEntity;

    @ApiModelProperty(value = "与实体对应的主键ID")
    private Integer permissionEntityKey;

    @ApiModelProperty(value = "被授权的类型，菜单，按钮，其他操作可以扩展，字典值")
    private Integer permissionAccessEntity;

    @ApiModelProperty(value = "被授权的类型的主键值")
    private String permissionAccessEntityKey;

    @ApiModelProperty(value = "状态，可以操作，不可以操作")
    private Integer permissionEnabled;

    private Integer createUserId;

    private Date createDate;

    private Integer modifyUserId;

    private Date modifyDate;

    private String code;

    private String desc;


}
